<template>
  <h1>Hello Vue3</h1>
  <h2>工资：{{ salary }}</h2>
  <button @click="addBtn(1000)">加油~</button>
</template>

<script>
import { ref } from 'vue'
export default {
  setup() {
    const salary = ref(10000)
    const addBtn = val => {
      salary.value += val
    }
    return { salary, addBtn }
    
  },
}
</script>